<?php 
	$maxLevel 	= 30;
	$maxX		= 81;
	$maxY		= 81;
	$fromX		= 10;
	$toX		= 30;
	$fromY		= 10;
	$toY		= 30;
?>
<hr style="margin:10px 0 5px 0"></hr>
<p>Api api</p>
<form id="api_api" action="?_r=scene" method="post">
	<?php //for ($i=0; $i<$maxLevel; $i++) {?>
		<input type="hidden" name="data[id]" value="1" />
	<?php //} ?>
	<hr />
	<?php 
		$scene	= vApi::getBase('scene_cfg')->get();
		$scene	= $scene['cfg'];
		print_r(strlen(json_encode($scene)));die();
		for ($y=0; $y<$maxY; $y++) 
		{
			for($x=0; $x<$maxX; $x++) 
			{ 
				if ( isset($scene[$y][$x]) || $y==41 || $x==41) {
					echo '<input type="checkbox" name="data[cfg]['.$y.']['.$x.']" value="0" checked="checked">';
				} else {
					echo '<input type="checkbox" name="data[cfg]['.$y.']['.$x.']" value="0">';
				}
			}
			echo '<br />';
		}
	?>
	<input type="submit" value="创建">
</form>